package com.hk.service.kyc;

import java.util.List;

import com.hk.commons.HqlFilter;
import com.hk.commons.entity.PointsHistory;

public interface IUserPoints {
	
	public PointsHistory findById(Long id);

	/**
	 * 根据userId 获取所有的积分记录
	 * @param userId
	 * @return
	 */
	public List<PointsHistory> findByUserId(Long userId);
	
	
	/**
	 * 根据用户id 获取其总的积分
	 * @param userId
	 * @return
	 */
	public Integer getTotalScoreByUserId(Long userId);
	
	/**
	 * 保存
	 * 
	 * @param b
	 * @return
	 */
	public void add(PointsHistory u);

	/**
	 * 删除
	 * 
	 * @param id
	 * @return
	 */
	public void delete(PointsHistory u);

	/**
	 * 更新
	 * 
	 * @param b
	 */
	public void update(PointsHistory u);

	public List<PointsHistory> findByFilter(HqlFilter hqlFilter, int pageNum,
			int pageSize);

	public List<PointsHistory> findByFilter(HqlFilter hqlFilter);

	public Long countByFilter(HqlFilter hqlFilter);
	
}
